n=int(input())
for a in range(2,n+1,1):
    for b in range(2,a,1):
        if a%b==0:
            break
    else:
        print(a)


